using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Microsoft.Practices.RepositoryFactory.CustomPages.Helpers
{
    internal static class UIGuard
    {
        public static bool IsListBoxSelected(ListBox listBox)
        {
            return (listBox.Items.Count > 0
                && listBox.SelectedItem != null);
        }

        public static bool IsListBoxChecked(CheckedListBox listBox)
        {
            return (listBox.CheckedItems.Count > 0);
        }
    }
}
